from applications.extensions import ma
from marshmallow import fields
from applications.models import Dept


# 管理员administrator的序列化类
class AdministratorOutSchema(ma.Schema):
    id = fields.Integer()
    name = fields.Str()
    avatar = fields.Str()
    dept_id = fields.Integer()
    subject_at = fields.Str()
    create_at = fields.DateTime()
    update_at = fields.DateTime()

# 管理员administrator_OP的序列化类
class AdministratorOPSchema(ma.Schema):
    id = fields.Integer()
    operatorid = fields.Integer()
    operatorname = fields.Str()
    classid = fields.Integer()
    classname = fields.Str()
    create_at = fields.DateTime()
    update_at = fields.DateTime()
    success = fields.Bool()